10.3 a. For any positive integer n, describe how to arrange the integers 1,2, . . . , n so that when they are inserted into a BinarySearchTree object, the height of the tree will be linear in n.
b. For any positive integer n, describe how to arrange the integers 1,2, . . . , n so that when they are inserted into a BinarySearchTree object, the height of the tree will be logarithmic in n.
c. For any positive integer n, describe how to arrange the integers 1,2, . . . , n so that when they are inserted into an AVLTree object, the height of the tree will be logarithmic in n.
d. For any positive integer n, is it possible to arrange the integers 1,2, . . . , n so that when they are inserted into an AVLTree object, the height of the tree will be linear in n? Explain.
 
 
View Solution
 
 
 
<< Back Next >>